
class SecurityFilters {

    def filters = {
        loginCheck(controller:'*', action:'*') {
            before = { 
                if (session.user) {
                    return true
                } else {
                    if (actionName == "login" || actionName == "create"
                        || actionName == "save" ) {
                        return true
                    } else {
                        redirect(uri:"")
                        return false
                    }
                }
            }
        }
    }
}

